@extends('home/layout')
@section('content')

<div class="trailer">
	<!-- 电影标题 -->
	<div class="movie_title_bg">
		<div class="movie_title">
			<p>
				<a href="#">{{ $oneMovie -> name[0] }}</a>
				<a href="#">({{$oneMovie -> time}})</a>
			</p>
			<a href="#">{{ $oneMovie -> name[1] }}</a>
		</div>
	</div>
	<!-- 导航菜单 -->
	<div class="movie_menu_bg">
		<div class="movie_menu">
			<a href="{{ url('/home/movie/details') }}/{{ $oneMovie -> id }}"><span>首</span> 页</a>
			<a href="{{ url('/home/movie/details') }}/{{ $oneMovie -> id }}/plots"><span>剧</span> 情</a>
			<a><span>视</span> 频</a>
			<a style="background:#004C7F; color:#fff;" href="{{ url('/home/movie/details') }}/{{ $oneMovie -> id }}/image"><span>图</span> 片</a>
			<a href="{{ url('/home/movie/details') }}/{{ $oneMovie -> id }}/actor"><span>演</span> 员</a>
			<a href="{{ url('/home/movie/details') }}/{{ $oneMovie -> id }}/comment"><span>影</span> 评</a>
			<a href="{{ url('/home/movie/details') }}/{{ $oneMovie -> id }}/other"><span>其</span> 他</a>
		</div>
	</div>
	<!-- 图片 -->
	<div class="movie_trailer">
		<div class="movie_trailer_list">
			<h3 style="display:inline-block;">电影图片</h3>
			<div style="float:right; width:350px;height:30px;margin-top:20px;">

			@if(session('user'))
			<form method="post" action="{{ url('/home/upload/insert') }}" enctype="multipart/form-data">
				{{ csrf_field() }}
				
				<input type="hidden" name="uid" value="{{ session('user') -> id }}">
				<input type="hidden" name="pid" value="{{ $oneMovie -> id }}">
				<input type="hidden" name="auth" value="1">
				<input style="float:left;" type="file" name="content" />
				<button style="float:right; margin-right:30px">上传</button>
			</form>
			@endif
			
			</div>
			<span id="remind" style="color:red;">{{ session('info') }}</span>
			<script type="text/javascript">
				
				$('#remind').slideToggle(10000);

			</script>
			<dl>
				<dd>

					@foreach($images as $image)
					<a>
						<img width="235" height="132" src="{{ $image -> content }}" style="margin-bottom: 5px;">
					</a>
					@endforeach
					
				</dd>
				<script type="text/javascript">
					
				$('#showImg').click(function()
					{

						$('.showImage').css('display', 'block');

					});
				$('.showImage').click(function()
					{

						$(this).css('display', 'none');
						
					});

				</script>
			</dl>
		</div>
	</div>
</div>

@endsection